﻿/*************************************************************************
 *  Copyright (C), 2015-2016,
 *  FileName: StepManager.cs
 *  Author: xzy   Version: 1.0   Date: 2016/1/18
 *  Version Description:
 *    Step process control
 *************************************************************************/

using UnityEngine;
using System.Collections;
//using System.Collections.Generic;

public class StepProcess : MonoBehaviour
{
    /// <summary>
    /// 当前步骤数
    /// </summary>
    //public static int m_curStep
    //{
    //    set;
    //    get;
    //}

    /// <summary>
    /// 脚本中执行的各个步骤
    /// </summary>
    public int m_processStep
    {
        set;
        get;
    }

    public bool m_processError
    {
        set;
        get;
    }

    /// <summary>
    /// 脚本控制的流程完成标示
    /// </summary>
    public bool m_processFinished
    {
        set;
        get;
    }
    /// <summary>
    /// 主循环执行脚本步骤
    /// </summary>
    public bool m_processExecutable;

    public void SetLayer(GameObject child, LayerMask layerIndex)
    {
        if (child != null)
        {
            child.layer = layerIndex;
            foreach (Transform temp in child.transform)
            {
                SetLayer(temp.gameObject, layerIndex);
            }
        }
    }

}
